const Router = require('koa-router');
const tool = require("../../tools/tool");
const router = new Router();
const {db, Op, QueryTypes} = require("../../models/db");
// 终端分类
router.post('/app/getContactCat', async ctx => {
    let tenantId= ctx.user.tenantId
    let sql = `SELECT id, name FROM 
      contact_cat where 
       tenantId=${tenantId} `
    let model = await db.query(sql, {type: QueryTypes.SELECT})

    return ctx.suc('', model)
})



module.exports = router;